﻿<?xml version="1.0" encoding="utf-8" ?>
<FieldTypes>
  <FieldType>
    <Field Name="TypeName">TableCheckField</Field>
    <Field Name="ParentType">Text</Field>
    <Field Name="TypeDisplayName">Table Check Field</Field>
    <Field Name="TypeShortDescription">Table Check Field</Field>
    <Field Name="UserCreatable">TRUE</Field>
    <Field Name="Sortable">TRUE</Field>
    <Field Name="Filterable">TRUE</Field>
    <Field Name="FieldTypeClass">CustomFieldTypes.TableCheckField, $SharePoint.Project.AssemblyFullName$</Field>
    <Field Name="FieldEditorUserControl">/_controltemplates/TableCheckFieldEditor.ascx</Field>
    <PropertySchema>
      <Fields>
        <Field Hidden="TRUE" Name="Header1Name" DisplayName="Header1Name" Type="Text"></Field>
        <Field Hidden="TRUE" Name="Header2Name" DisplayName="Header2Name" Type="Text"></Field>
        <Field Hidden="TRUE" Name="Header3Name" DisplayName="Header3Name" Type="Text"></Field>
        <Field Hidden="TRUE" Name="ValuesList" DisplayName="ValuesList" Type="Text"></Field>
      </Fields>
    </PropertySchema>
    <RenderPattern Name="DisplayPattern">
      <Switch>
        <Expr>
          <Column HTMLEncode="TRUE"/>
        </Expr>
        <Case Value="">
          <Property Select="Header1Name" HTMLEncode="TRUE"/>
          <HTML>
            <![CDATA[: None.]]>
          </HTML>
        </Case>
        <Default>
          <Property Select="Header1Name" HTMLEncode="TRUE"/>
          <HTML>
            <![CDATA[ 
            <script type="text/javascript">for (var fieldValue in "]]>
          </HTML>
          <Column HTMLEncode="TRUE"/>
          <HTML>
            <![CDATA[".split(',')) document.write(fieldValue.split('|')[0]); </script>]]>
          </HTML>
        </Default>
      </Switch>
    </RenderPattern>
  </FieldType>
</FieldTypes>
